home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1992 June: ROMin Holiday / ADC Developer CD (1992-06) (''ROMin Holiday'')_iso / Developer Connection - 06-1992.iso / Developer Essentials / MPW Interfaces & Libraries / AIncludes / ADSPEqu.a next >
Encoding:
Text File  |  1992-01-29  |  6.4 KB  |  180 lines  |  [TEXT/MPS ]

  1. ; Version: 1.10
  2. ; Created: Friday, January 19, 1990 at 9:11:52 AM
  3. ; File: ADSPEqu.a
  4. ;
  5. ; Assembler Interface to the Macintosh Libraries
  6. ; Copyright Apple Computer, Inc. 1989-1991
  7. ; All Rights Reserved
  8. ;
  9. ;--------------------------------------------------------------------
  10.  
  11.     IF &TYPE('__IncludingADSPEqu__') = 'UNDEFINED' THEN
  12. __IncludingADSPEqu__    SET    1
  13.  
  14.  
  15. ;    error codes
  16.  
  17. errRefNum        EQU        -1280            ; bad connection refNum
  18. errAborted        EQU        -1279            ; control call was aborted
  19. errState        EQU        -1278            ; bad connection state for this operation
  20. errOpening        EQU        -1277            ; open connection request failed
  21. errAttention    EQU        -1276            ; attention message too long
  22. errFwdReset        EQU        -1275            ; read terminated by forward reset
  23. errDSPQueueSize    EQU        -1274            ; send or receive queue is too small
  24. errOpenDenied    EQU        -1273            ; open connection request was denied
  25.  
  26.  
  27.  
  28.  
  29. ;    client control codes
  30.  
  31. dspInit            EQU        255                ; create a new connection end
  32. dspRemove        EQU        254                ; remove a connection end
  33. dspOpen            EQU        253                ; open a connection
  34. dspClose        EQU        252                ; close a connection
  35. dspCLInit        EQU        251                ; create a connection listener
  36. dspCLRemove        EQU        250                ; remove a connection listener
  37. dspCLListen        EQU        249                ; post a listener request
  38. dspCLDeny        EQU        248                ; deny an open connection request
  39. dspStatus        EQU        247                ; get status of connection end
  40. dspRead            EQU        246                ; read data from the connection
  41. dspWrite        EQU        245                ; write data on the connection
  42. dspAttention    EQU        244                ; send an attention message
  43. dspOptions        EQU        243                ; set connection end options
  44. dspReset        EQU        242                ; forward reset the connection
  45. dspNewCID        EQU        241                ; generate a cid for a connection end
  46.  
  47.  
  48.  
  49.  
  50. ;    open connection modes
  51.  
  52. ocRequest        EQU        1                ; request a connection with remote
  53. ocPassive        EQU        2                ; wait for a connection request from remote
  54. ocAccept        EQU        3                ; accept request as delivered by listener
  55. ocEstablish        EQU        4                ; consider connection to be open
  56.  
  57.  
  58.  
  59.  
  60. ;    connection states
  61.  
  62. sListening        EQU        1                ; for connection listeners
  63. sPassive        EQU        2                ; waiting for a connection request from remote
  64. sOpening        EQU        3                ; requesting a connection with remote
  65. sOpen            EQU        4                ; connection is open
  66. sClosing        EQU        5                ; connection is being torn down
  67. sClosed            EQU        6                ; connection end state is closed
  68.  
  69.  
  70.  
  71.  
  72. ;    client event flags (bit-mask)
  73.  
  74. eClosed            EQU        $80                ; received connection closed advice
  75. eTearDown        EQU        $40                ; closed due to broken connection
  76. eAttention        EQU        $20                ; received attention message
  77. eFwdReset        EQU        $10                ; received forward reset advice
  78.  
  79.  
  80.  
  81.  
  82. ;    miscellaneous equates
  83.  
  84. attnBufSize        EQU        570                ; size of client attention message
  85. minDSPQueueSize    EQU        100                ; minimum size for both receive and send queues
  86.  
  87.  
  88.  
  89. ;    connection control block equates & size
  90.  
  91.  
  92. ccbLink           EQU         0                         ; link to next ccb
  93. refNum            EQU         ccbLink+4                 ; user reference number
  94. state             EQU         refNum+2                  ; state of the connection end
  95. userFlags         EQU         state+2                   ; flags for unsolicited connection events
  96. localSocket       EQU         userFlags+1               ; socket number of this connection end
  97. remoteAddress     EQU         localSocket+1             ; internet address of remote end
  98. attnCode          EQU         remoteAddress+4           ; attention code received
  99. attnSize          EQU         attnCode+2                ; size of received attention data
  100. attnPtr           EQU         attnSize+2                ; ptr to received attention data
  101.  
  102. ccbSize           EQU         attnPtr+224               ; total byte size of ccb
  103.  
  104.  
  105.  
  106.  
  107. ;    adsp queue element equates & size
  108.  
  109. csQStatus         EQU         $1C                       ; csQStatus EQU CSParam (adsp internal use)
  110. csCCBRef          EQU         csQStatus+4               ; refnum of ccb
  111.  
  112. ;    dspInit, dspCLInit
  113.  
  114. csCCBPtr          EQU         csCCBRef+2                ; pointer to connection control block
  115. csUserRtn         EQU         csCCBPtr+4                ; client routine to call on event
  116. csSendQSize       EQU         csUserRtn+4               ; size of send queue (0..64K bytes)
  117. csSendQueue       EQU         csSendQSize+2             ; client passed send queue buffer
  118. csRecvQSize       EQU         csSendQueue+4             ; size of receive queue (0..64K bytes)
  119. csRecvQueue       EQU         csRecvQSize+2             ; client passed receive queue buffer
  120. csAttnPtr         EQU         csRecvQueue+4             ; client passed receive attention buffer
  121. csLocSkt          EQU         csAttnPtr+4               ; local socket number
  122.  
  123. ;    dspOpen, dspCLListen, dspCLDeny
  124.  
  125. csLocCID          EQU         csCCBRef+2                ; local connection id
  126. csRemCID          EQU         csLocCID+2                ; remote connection id
  127. csRemAddr         EQU         csRemCID+2                ; address of remote end
  128. csFltrAddr        EQU         csRemAddr+4               ; address filter
  129. csSendSeq         EQU         csFltrAddr+4              ; local send sequence number
  130. csSendWdw         EQU         csSendSeq+4               ; send window size
  131. csRecvSeq         EQU         csSendWdw+2               ; receive sequence number
  132. csAttnSendSeq     EQU         csRecvSeq+4               ; attention send sequence number
  133. csAttnRecvSeq     EQU         csAttnSendSeq+4           ; attention receive sequence number
  134. csOCMode          EQU         csAttnRecvSeq+4           ; open connection mode
  135. csOCInterval      EQU         csOCMode+1                ; open connection request retry interval
  136. csOCMaximum       EQU         csOCInterval+1            ; open connection request retry maximum
  137.  
  138. ;    dspClose, dspRemove
  139.  
  140. csAbort           EQU         csCCBRef+2                ; abort connection immediately if non-zero
  141.  
  142. ;    dspStatus
  143.  
  144. csSQPending       EQU         csCCBPtr+4                ; pending bytes in send queue
  145. csSQFree          EQU         csSQPending+2             ; available buffer space in send queue
  146. csRQPending       EQU         csSQFree+2                ; pending bytes in receive queue
  147. csRQFree          EQU         csRQPending+2             ; available buffer space in receive queue
  148.  
  149. ;    dspRead, dspWrite
  150.  
  151. csReqCount        EQU         csCCBRef+2                ; requested number of bytes
  152. csActCount        EQU         csReqCount+2              ; actual number of bytes
  153. csDataPtr         EQU         csActCount+2              ; pointer to data buffer
  154. csEOM             EQU         csDataPtr+4               ; indicates logical end of message
  155. csFlush           EQU         csEOM+1                   ; send data now
  156.  
  157. ;    dspAttention
  158.  
  159. csAttnCode        EQU         csCCBRef+2                ; client attention code
  160. csAttnSize        EQU         csAttnCode+2              ; size of attention data
  161. csAttnData        EQU         csAttnSize+2              ; pointer to attention data
  162. csAttnInterval    EQU         csAttnData+4              ; retransmit timer in 10-tick intervals
  163.  
  164. ;    dspOptions
  165.  
  166. csSendBlocking    EQU         csCCBRef+2                ; quantum for data packets
  167. csSendTimer       EQU         csSendBlocking+2          ; send timer in 10-tick intervals
  168. csRtmtTimer       EQU         csSendTimer+1             ; retransmit timer in 10-tick intervals
  169. csBadSeqMax       EQU         csRtmtTimer+1             ; threshold for sending retransmit advice
  170. csUseCheckSum     EQU         csBadSeqMax+1             ; use ddp packet checksum
  171.  
  172. ;    dspNewCID
  173.  
  174. csNewCID          EQU         csCCBRef+2                ; new connection id returned
  175.  
  176.  
  177. dspPBSize         EQU         68                        ; byte size of largest dsp param block
  178.  
  179.  
  180.     ENDIF    ; ...already included